<?php
/**
 * 房间数据组件
 */
class CommWidget extends Widget{

	/**
	 * 渲染输出 render方法是Widget唯一的接口
	 * 使用字符串返回 不能有任何输出
	 * @access public
	 * @param mixed $data 要渲染的数据
	 * @return string
	 */
	public function render($data)
	{
		echo __SELF__ ;
		$day = time()-86400*7;
		$condition['account_id'] = $data[0]['account_id'];
		$condition['cut_off'] = 0;
		$condition['create_time'] = array('egt',$day);
		$list = D('Features')->where($condition)->select();
		$render = array(
			'commdata' => $list,
		);
		$content = $this->renderFile('comm',$render);
		return $content;

	}

}